def solve(str):
    '''
    设计一个函数solve，我们想要对传入的字符串统计：大写、小写，数字，特殊符号的个数
    比如 solve("Helloworld@hello123.com") 大写字母为1个，小写17个，数字3个，特殊符号2个，输出结果为 [1,17,3,2]
    :param str:
    :return:
    '''
    upper_count = 0
    lower_count = 0
    number_count = 0
    special_char_count = 0

    for char in str:
        if char.isupper():
            upper_count += 1
        elif char.islower():
            lower_count += 1
        elif char.isdigit():
            number_count += 1
        else:
            special_char_count += 1

    return [upper_count, lower_count, number_count, special_char_count]


if __name__ == '__main__':
    print(solve("Helloworld@hello123.com"))
    print(solve("bgA5<1d-tOwUZTS8yQ"))
    print(solve("P*K4%>mQUDaG$h=cx2?.Czt7!Zn16p@5H"))
    print(solve("RYT'>s&gO-.CM9AKeH?,5317tWGpS<*x2ukXZD"))
    print(solve("$Cnl)Sr<7bBW-&qLHI!mY41ODe"))
    print(solve("@mw>0=QD-iAx!rp9TaG?o&M%l$34L.nbft"))
